#ifndef ELEMENT_LOADER_H
#define ELEMENT_LOADER_H

#include "Element.h"
#include "tinyxml.h"
#include <map>
#include <string>
#include <iostream>

using namespace std;

class ElementLoader
{
public:

	ElementLoader(void) {}
	virtual ~ElementLoader(void) {}

	virtual Element * createElement(TiXmlElement *elem) =0;

	static map<string, Element *> elements;
};

#endif

//#define ADD_ATTRIBUTE(x) setAttribute(#x, &(x))
/*

class Element {
	map<string, float*>
	virtual void setAttribute(name, value);
};


class Light : Element {
	float x;
	Light() {
		ADD_ATTRIBUTE(x);
		ADD_ATTRIBUTE(y);
	}
}
*/